Depth vs. space tradeoff